package com.cc.pojo.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 前端选择栏格式
 *
 * @author shadow
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class OptionsVo<T> {
    @Schema(description = "选项名")
    private String label;
    @Schema(description = "选项值/id")
    private String value;
    @Schema(description = "子选项")
    private List<T> children;

    public OptionsVo(String label, String value) {
        this.label = label;
        this.value = value;
    }
}
